﻿namespace HRM.CORE.REPORT
{
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using HRM.CORE;
    
    
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptSalaryByEmployee : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private IContainer components;
        private DetailBand Detail;
        private DetailBand Detail1;
        private DetailReportBand DetailReport;
        private GroupFooterBand GroupFooter2;
        private GroupHeaderBand GroupHeader1;
        private HRM_SALARY l_Salary;
        private string m_EmployeeCode;
        private int m_Order;
        private int m_Year;
        private XRPictureBox ptPhoto;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRLabel txtAddress;
        private XRTableCell txtAdvance;
        private XRTableCell txtAllowance;
        private XRTableCell txtAllowanceInsurance;
        private XRTableCell txtAssignment;
        private XRTableCell txtBasicSalary;
        private XRTableCell txtCoefficientSalary;
        private XRLabel txtCompany;
        private XRLabel txtEmployeeCode;
        private XRTableCell txtIncomeTaxMoney;
        private XRLabel txtInformation;
        private XRTableCell txtInsurance;
        private XRTableCell txtInsuranceSalary;
        private XRTableCell txtMinusLateEarly;
        private XRTableCell txtMinusMoney;
        private XRTableCell txtOrder;
        private XRTableCell txtSalary;
        private XRTableCell txtSalaryMinus;
        private XRTableCell txtSalaryPlus;
        private XRTableCell txtSalaryTableListName;
        private XRLabel txtTitle;
        private XRLabel txtTotal;
        private XRLabel txtUnit;
        private XRLabel xrLabel2;
        private XRLabel xrLabel3;
        private XRLine xrLine1;
        private XRLine xrLine2;
        private XRTable xrTable1;
        private XRTable xrTable2;
        private XRTable xrTable3;
        private XRTableCell xrTableCell1;
        private XRTableCell xrTableCell10;
        private XRTableCell xrTableCell11;
        private XRTableCell xrTableCell12;
        private XRTableCell xrTableCell15;
        private XRTableCell xrTableCell16;
        private XRTableCell xrTableCell17;
        private XRTableCell xrTableCell18;
        private XRTableCell xrTableCell19;
        private XRTableCell xrTableCell2;
        private XRTableCell xrTableCell20;
        private XRTableCell xrTableCell21;
        private XRTableCell xrTableCell22;
        private XRTableCell xrTableCell23;
        private XRTableCell xrTableCell24;
        private XRTableCell xrTableCell3;
        private XRTableCell xrTableCell4;
        private XRTableCell xrTableCell5;
        private XRTableCell xrTableCell6;
        private XRTableCell xrTableCell7;
        private XRTableCell xrTableCell8;
        private XRTableCell xrTableCell9;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;
        private XRTableRow xrTableRow3;
        private XRTableRow xrTableRow4;

        public rptSalaryByEmployee()
        {
            this.components = null;
            this.l_Salary = new HRM_SALARY();
            this.m_EmployeeCode = "";
            this.m_Year = 0;
            this.m_Order = 0;
            this.InitializeComponent();
        }

        public rptSalaryByEmployee(string EmployeeCode, int Year)
        {
            this.components = null;
            this.l_Salary = new HRM_SALARY();
            this.m_EmployeeCode = "";
            this.m_Year = 0;
            this.m_Order = 0;
            this.InitializeComponent();
            this.m_Year = Year;
            this.m_EmployeeCode = EmployeeCode;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.txtInformation = new XRLabel();
            this.txtEmployeeCode = new XRLabel();
            this.xrLine1 = new XRLine();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.txtTitle = new XRLabel();
            this.txtUnit = new XRLabel();
            this.txtAddress = new XRLabel();
            this.ptPhoto = new XRPictureBox();
            this.txtCompany = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.ReportFooter = new ReportFooterBand();
            this.xrTable3 = new XRTable();
            this.xrTableRow3 = new XRTableRow();
            this.xrTableCell7 = new XRTableCell();
            this.xrTableCell8 = new XRTableCell();
            this.xrTableCell9 = new XRTableCell();
            this.xrTableRow4 = new XRTableRow();
            this.xrTableCell10 = new XRTableCell();
            this.xrTableCell11 = new XRTableCell();
            this.xrTableCell12 = new XRTableCell();
            this.DetailReport = new DetailReportBand();
            this.Detail1 = new DetailBand();
            this.GroupHeader1 = new GroupHeaderBand();
            this.GroupFooter2 = new GroupFooterBand();
            this.txtTotal = new XRLabel();
            this.xrLabel3 = new XRLabel();
            this.xrLine2 = new XRLine();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.xrTableCell1 = new XRTableCell();
            this.xrTableCell2 = new XRTableCell();
            this.xrTableCell3 = new XRTableCell();
            this.xrTableCell4 = new XRTableCell();
            this.xrTableCell19 = new XRTableCell();
            this.xrTableCell24 = new XRTableCell();
            this.xrTableCell18 = new XRTableCell();
            this.xrTableCell15 = new XRTableCell();
            this.xrTableCell5 = new XRTableCell();
            this.xrTableCell21 = new XRTableCell();
            this.xrTableCell6 = new XRTableCell();
            this.xrTableCell20 = new XRTableCell();
            this.xrTableCell22 = new XRTableCell();
            this.xrTableCell23 = new XRTableCell();
            this.xrTableCell16 = new XRTableCell();
            this.xrTableCell17 = new XRTableCell();
            this.xrTable2 = new XRTable();
            this.xrTableRow2 = new XRTableRow();
            this.txtOrder = new XRTableCell();
            this.txtSalaryTableListName = new XRTableCell();
            this.txtCoefficientSalary = new XRTableCell();
            this.txtBasicSalary = new XRTableCell();
            this.txtInsuranceSalary = new XRTableCell();
            this.txtAllowanceInsurance = new XRTableCell();
            this.txtAllowance = new XRTableCell();
            this.txtMinusLateEarly = new XRTableCell();
            this.txtMinusMoney = new XRTableCell();
            this.txtInsurance = new XRTableCell();
            this.txtIncomeTaxMoney = new XRTableCell();
            this.txtAdvance = new XRTableCell();
            this.txtAssignment = new XRTableCell();
            this.txtSalaryPlus = new XRTableCell();
            this.txtSalaryMinus = new XRTableCell();
            this.txtSalary = new XRTableCell();
            this.xrTable3.BeginInit();
            this.xrTable1.BeginInit();
            this.xrTable2.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { this.txtInformation, this.txtEmployeeCode, this.xrLine1 });
            this.Detail.HeightF = 30f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.txtInformation.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtInformation.LocationFloat = new PointFloat(781.375f, 1.791668f);
            this.txtInformation.Name = "txtInformation";
            this.txtInformation.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtInformation.SizeF = new SizeF(340.625f, 18.20833f);
            this.txtInformation.StylePriority.UseFont = false;
            this.txtInformation.StylePriority.UseTextAlignment = false;
            this.txtInformation.Text = "txtInformation";
            this.txtInformation.TextAlignment = TextAlignment.MiddleRight;
            this.txtEmployeeCode.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtEmployeeCode.LocationFloat = new PointFloat(0f, 4.166649f);
            this.txtEmployeeCode.Name = "txtEmployeeCode";
            this.txtEmployeeCode.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtEmployeeCode.SizeF = new SizeF(360.4167f, 17.70833f);
            this.txtEmployeeCode.StylePriority.UseFont = false;
            this.txtEmployeeCode.Text = "txtEmployeeCode";
            this.xrLine1.BorderWidth = 0;
            this.xrLine1.ForeColor = Color.DarkGray;
            this.xrLine1.LocationFloat = new PointFloat(3.178914E-05f, 21.875f);
            this.xrLine1.Name = "xrLine1";
            this.xrLine1.SizeF = new SizeF(1121f, 6.125021f);
            this.xrLine1.StylePriority.UseBorderWidth = false;
            this.xrLine1.StylePriority.UseForeColor = false;
            this.TopMargin.HeightF = 40f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 40f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.txtTitle, this.txtUnit, this.txtAddress, this.ptPhoto, this.txtCompany, this.xrLabel2 });
            this.ReportHeader.HeightF = 118f;
            this.ReportHeader.Name = "ReportHeader";
            this.txtTitle.Font = new Font("Times New Roman", 16f, FontStyle.Bold);
            this.txtTitle.LocationFloat = new PointFloat(3.178914E-05f, 63.33332f);
            this.txtTitle.Name = "txtTitle";
            this.txtTitle.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTitle.SizeF = new SizeF(1121f, 30.25001f);
            this.txtTitle.StylePriority.UseFont = false;
            this.txtTitle.StylePriority.UseTextAlignment = false;
            this.txtTitle.Text = "BẢNG LƯƠNG NH\x00c2N VI\x00caN NĂM 0000";
            this.txtTitle.TextAlignment = TextAlignment.MiddleCenter;
            this.txtUnit.LocationFloat = new PointFloat(4.768372E-05f, 93.58333f);
            this.txtUnit.Name = "txtUnit";
            this.txtUnit.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtUnit.SizeF = new SizeF(1121f, 17.70834f);
            this.txtUnit.StylePriority.UseTextAlignment = false;
            this.txtUnit.TextAlignment = TextAlignment.MiddleCenter;
            this.txtAddress.Font = new Font("Times New Roman", 9.75f);
            this.txtAddress.LocationFloat = new PointFloat(144.8751f, 31.70837f);
            this.txtAddress.Name = "txtAddress";
            this.txtAddress.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtAddress.SizeF = new SizeF(590.3128f, 17.70833f);
            this.txtAddress.StylePriority.UseFont = false;
            this.txtAddress.Text = "txtAddress";
            this.ptPhoto.LocationFloat = new PointFloat(4.768372E-05f, 5f);
            this.ptPhoto.Name = "ptPhoto";
            this.ptPhoto.SizeF = new SizeF(88.54166f, 58.33333f);
            this.ptPhoto.Sizing = ImageSizeMode.ZoomImage;
            this.txtCompany.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtCompany.LocationFloat = new PointFloat(91.5417f, 10.00001f);
            this.txtCompany.Name = "txtCompany";
            this.txtCompany.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtCompany.SizeF = new SizeF(643.6466f, 17.70833f);
            this.txtCompany.StylePriority.UseFont = false;
            this.txtCompany.Text = "txtCompany";
            this.xrLabel2.Font = new Font("Times New Roman", 9.75f);
            this.xrLabel2.LocationFloat = new PointFloat(91.5417f, 31.70827f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(53.3334f, 17.70833f);
            this.xrLabel2.StylePriority.UseFont = false;
            this.xrLabel2.Text = "Địa Chỉ:";
            this.ReportFooter.Controls.AddRange(new XRControl[] { this.xrTable3 });
            this.ReportFooter.HeightF = 100f;
            this.ReportFooter.Name = "ReportFooter";
            this.xrTable3.LocationFloat = new PointFloat(4.768372E-05f, 0f);
            this.xrTable3.Name = "xrTable3";
            this.xrTable3.Rows.AddRange(new XRTableRow[] { this.xrTableRow3, this.xrTableRow4 });
            this.xrTable3.SizeF = new SizeF(1121f, 62.5f);
            this.xrTableRow3.Cells.AddRange(new XRTableCell[] { this.xrTableCell7, this.xrTableCell8, this.xrTableCell9 });
            this.xrTableRow3.Name = "xrTableRow3";
            this.xrTableRow3.Weight = 1.0;
            this.xrTableCell7.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell7.Name = "xrTableCell7";
            this.xrTableCell7.StylePriority.UseFont = false;
            this.xrTableCell7.StylePriority.UseTextAlignment = false;
            this.xrTableCell7.Text = "Người lập bảng";
            this.xrTableCell7.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell7.Weight = 1.0;
            this.xrTableCell8.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell8.Name = "xrTableCell8";
            this.xrTableCell8.StylePriority.UseFont = false;
            this.xrTableCell8.StylePriority.UseTextAlignment = false;
            this.xrTableCell8.Text = "Kế to\x00e1n trưởng";
            this.xrTableCell8.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell8.Weight = 1.0;
            this.xrTableCell9.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTableCell9.Name = "xrTableCell9";
            this.xrTableCell9.StylePriority.UseFont = false;
            this.xrTableCell9.StylePriority.UseTextAlignment = false;
            this.xrTableCell9.Text = "Gi\x00e1m đốc";
            this.xrTableCell9.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell9.Weight = 1.0;
            this.xrTableRow4.Cells.AddRange(new XRTableCell[] { this.xrTableCell10, this.xrTableCell11, this.xrTableCell12 });
            this.xrTableRow4.Name = "xrTableRow4";
            this.xrTableRow4.Weight = 1.0;
            this.xrTableCell10.Font = new Font("Times New Roman", 9.75f, FontStyle.Italic);
            this.xrTableCell10.Name = "xrTableCell10";
            this.xrTableCell10.StylePriority.UseFont = false;
            this.xrTableCell10.StylePriority.UseTextAlignment = false;
            this.xrTableCell10.Text = "(K\x00fd v\x00e0 ghi r\x00f5 họ t\x00ean)";
            this.xrTableCell10.TextAlignment = TextAlignment.TopCenter;
            this.xrTableCell10.Weight = 1.0;
            this.xrTableCell11.Font = new Font("Times New Roman", 9.75f, FontStyle.Italic);
            this.xrTableCell11.Name = "xrTableCell11";
            this.xrTableCell11.StylePriority.UseFont = false;
            this.xrTableCell11.StylePriority.UseTextAlignment = false;
            this.xrTableCell11.Text = "(K\x00fd v\x00e0 ghi r\x00f5 họ t\x00ean)";
            this.xrTableCell11.TextAlignment = TextAlignment.TopCenter;
            this.xrTableCell11.Weight = 1.0;
            this.xrTableCell12.Font = new Font("Times New Roman", 9.75f, FontStyle.Italic);
            this.xrTableCell12.Name = "xrTableCell12";
            this.xrTableCell12.StylePriority.UseFont = false;
            this.xrTableCell12.StylePriority.UseTextAlignment = false;
            this.xrTableCell12.Text = "(K\x00fd v\x00e0 ghi r\x00f5 họ t\x00ean)";
            this.xrTableCell12.TextAlignment = TextAlignment.TopCenter;
            this.xrTableCell12.Weight = 1.0;
            this.DetailReport.Bands.AddRange(new Band[] { this.Detail1, this.GroupHeader1, this.GroupFooter2 });
            this.DetailReport.Level = 0;
            this.DetailReport.Name = "DetailReport";
            this.Detail1.Controls.AddRange(new XRControl[] { this.xrTable2 });
            this.Detail1.HeightF = 29.16667f;
            this.Detail1.Name = "Detail1";
            this.GroupHeader1.Controls.AddRange(new XRControl[] { this.xrTable1 });
            this.GroupHeader1.HeightF = 54.58333f;
            this.GroupHeader1.Name = "GroupHeader1";
            this.GroupFooter2.Controls.AddRange(new XRControl[] { this.txtTotal, this.xrLabel3, this.xrLine2 });
            this.GroupFooter2.HeightF = 57f;
            this.GroupFooter2.Name = "GroupFooter2";
            this.txtTotal.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.txtTotal.LocationFloat = new PointFloat(97.3857f, 6.291708f);
            this.txtTotal.Name = "txtTotal";
            this.txtTotal.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTotal.SizeF = new SizeF(193.4569f, 17.70833f);
            this.txtTotal.StylePriority.UseFont = false;
            this.txtTotal.Text = "txtTotal";
            this.xrLabel3.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrLabel3.LocationFloat = new PointFloat(2.45834f, 6.291662f);
            this.xrLabel3.Name = "xrLabel3";
            this.xrLabel3.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel3.SizeF = new SizeF(90.92734f, 17.70833f);
            this.xrLabel3.StylePriority.UseFont = false;
            this.xrLabel3.Text = "Tổng Cộng:";
            this.xrLine2.BorderWidth = 0;
            this.xrLine2.ForeColor = Color.DarkGray;
            this.xrLine2.LocationFloat = new PointFloat(4.768372E-05f, 23.99998f);
            this.xrLine2.Name = "xrLine2";
            this.xrLine2.SizeF = new SizeF(1121f, 3.000069f);
            this.xrLine2.StylePriority.UseBorderWidth = false;
            this.xrLine2.StylePriority.UseForeColor = false;
            this.xrTable1.AnchorVertical = VerticalAnchorStyles.Bottom;
            this.xrTable1.BackColor = Color.WhiteSmoke;
            this.xrTable1.BorderColor = Color.Black;
            this.xrTable1.Borders = BorderSide.All;
            this.xrTable1.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTable1.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1 });
            this.xrTable1.SizeF = new SizeF(1121f, 54.58333f);
            this.xrTable1.StylePriority.UseBackColor = false;
            this.xrTable1.StylePriority.UseBorderColor = false;
            this.xrTable1.StylePriority.UseBorders = false;
            this.xrTable1.StylePriority.UseFont = false;
            this.xrTable1.StylePriority.UseTextAlignment = false;
            this.xrTable1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { this.xrTableCell1, this.xrTableCell2, this.xrTableCell3, this.xrTableCell4, this.xrTableCell19, this.xrTableCell24, this.xrTableCell18, this.xrTableCell15, this.xrTableCell5, this.xrTableCell21, this.xrTableCell6, this.xrTableCell20, this.xrTableCell22, this.xrTableCell23, this.xrTableCell16, this.xrTableCell17 });
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1.0;
            this.xrTableCell1.CanGrow = false;
            this.xrTableCell1.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.StylePriority.UseTextAlignment = false;
            this.xrTableCell1.Text = "STT";
            this.xrTableCell1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell1.Weight = 0.18749992582046493;
            this.xrTableCell2.CanGrow = false;
            this.xrTableCell2.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell2.Name = "xrTableCell2";
            this.xrTableCell2.StylePriority.UseFont = false;
            this.xrTableCell2.StylePriority.UseTextAlignment = false;
            this.xrTableCell2.Text = "T\x00ean bảng lương";
            this.xrTableCell2.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell2.Weight = 1.1863692838482263;
            this.xrTableCell3.CanGrow = false;
            this.xrTableCell3.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.StylePriority.UseFont = false;
            this.xrTableCell3.StylePriority.UseTextAlignment = false;
            this.xrTableCell3.Text = "Hệ số lương";
            this.xrTableCell3.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell3.Weight = 0.1730121835641622;
            this.xrTableCell4.CanGrow = false;
            this.xrTableCell4.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.StylePriority.UseFont = false;
            this.xrTableCell4.StylePriority.UseTextAlignment = false;
            this.xrTableCell4.Text = "Lương căn bản";
            this.xrTableCell4.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell4.Weight = 0.3361379630164853;
            this.xrTableCell19.CanGrow = false;
            this.xrTableCell19.Name = "xrTableCell19";
            this.xrTableCell19.Text = "LCB đ\x00f3ng BHXH";
            this.xrTableCell19.Weight = 0.30647842928661706;
            this.xrTableCell24.CanGrow = false;
            this.xrTableCell24.Name = "xrTableCell24";
            this.xrTableCell24.Text = "Phụ cấp đ\x00f3ng BHXH";
            this.xrTableCell24.Weight = 0.32707521890945546;
            this.xrTableCell18.CanGrow = false;
            this.xrTableCell18.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell18.Name = "xrTableCell18";
            this.xrTableCell18.StylePriority.UseFont = false;
            this.xrTableCell18.StylePriority.UseTextAlignment = false;
            this.xrTableCell18.Text = "Phụ cấp kh\x00e1c";
            this.xrTableCell18.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell18.Weight = 0.34520010202289492;
            this.xrTableCell15.CanGrow = false;
            this.xrTableCell15.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell15.Name = "xrTableCell15";
            this.xrTableCell15.StylePriority.UseFont = false;
            this.xrTableCell15.Text = "Trừ đi trể - về sớm";
            this.xrTableCell15.Weight = 0.296592622523031;
            this.xrTableCell5.CanGrow = false;
            this.xrTableCell5.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell5.Name = "xrTableCell5";
            this.xrTableCell5.StylePriority.UseFont = false;
            this.xrTableCell5.Text = "Trừ ng\x00e0y nghỉ";
            this.xrTableCell5.Weight = 0.29659232081371856;
            this.xrTableCell21.CanGrow = false;
            this.xrTableCell21.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell21.Name = "xrTableCell21";
            this.xrTableCell21.StylePriority.UseFont = false;
            this.xrTableCell21.StylePriority.UseTextAlignment = false;
            this.xrTableCell21.Text = "BHXH, BHYT, BHTN";
            this.xrTableCell21.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell21.Weight = 0.296592620972574;
            this.xrTableCell6.CanGrow = false;
            this.xrTableCell6.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell6.Name = "xrTableCell6";
            this.xrTableCell6.StylePriority.UseFont = false;
            this.xrTableCell6.Text = "Tiền đ\x00f3ng thuế";
            this.xrTableCell6.Weight = 0.29659261991205765;
            this.xrTableCell20.CanGrow = false;
            this.xrTableCell20.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell20.Name = "xrTableCell20";
            this.xrTableCell20.StylePriority.UseFont = false;
            this.xrTableCell20.Text = "Tạm ứng";
            this.xrTableCell20.Weight = 0.29659234080486441;
            this.xrTableCell22.CanGrow = false;
            this.xrTableCell22.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell22.Name = "xrTableCell22";
            this.xrTableCell22.StylePriority.UseFont = false;
            this.xrTableCell22.Text = "C\x00f4ng t\x00e1c ph\x00ed";
            this.xrTableCell22.Weight = 0.29659234080486452;
            this.xrTableCell23.CanGrow = false;
            this.xrTableCell23.Name = "xrTableCell23";
            this.xrTableCell23.Text = "C\x00e1c khoản thu nhập kh\x00e1c";
            this.xrTableCell23.Weight = 0.29659232194803248;
            this.xrTableCell16.CanGrow = false;
            this.xrTableCell16.Name = "xrTableCell16";
            this.xrTableCell16.Text = "C\x00e1c khoản khấu trừ kh\x00e1c";
            this.xrTableCell16.Weight = 0.29659232194803248;
            this.xrTableCell17.CanGrow = false;
            this.xrTableCell17.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell17.Name = "xrTableCell17";
            this.xrTableCell17.StylePriority.UseFont = false;
            this.xrTableCell17.StylePriority.UseTextAlignment = false;
            this.xrTableCell17.Text = "Thực l\x00e3nh";
            this.xrTableCell17.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell17.Weight = 0.30682060664186284;
            this.xrTable2.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable2.Font = new Font("Times New Roman", 8.25f);
            this.xrTable2.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.xrTable2.Rows.AddRange(new XRTableRow[] { this.xrTableRow2 });
            this.xrTable2.SizeF = new SizeF(1121f, 29.16667f);
            this.xrTable2.StylePriority.UseBorders = false;
            this.xrTable2.StylePriority.UseFont = false;
            this.xrTable2.StylePriority.UsePadding = false;
            this.xrTable2.StylePriority.UseTextAlignment = false;
            this.xrTable2.TextAlignment = TextAlignment.MiddleLeft;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { this.txtOrder, this.txtSalaryTableListName, this.txtCoefficientSalary, this.txtBasicSalary, this.txtInsuranceSalary, this.txtAllowanceInsurance, this.txtAllowance, this.txtMinusLateEarly, this.txtMinusMoney, this.txtInsurance, this.txtIncomeTaxMoney, this.txtAdvance, this.txtAssignment, this.txtSalaryPlus, this.txtSalaryMinus, this.txtSalary });
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1.0;
            this.txtOrder.Name = "txtOrder";
            this.txtOrder.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtOrder.StylePriority.UsePadding = false;
            this.txtOrder.StylePriority.UseTextAlignment = false;
            this.txtOrder.Text = "txtOrder";
            this.txtOrder.TextAlignment = TextAlignment.MiddleLeft;
            this.txtOrder.Weight = 0.18749981602642024;
            this.txtOrder.BeforePrint += new PrintEventHandler(this.txtOrder_BeforePrint);
            this.txtSalaryTableListName.Name = "txtSalaryTableListName";
            this.txtSalaryTableListName.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtSalaryTableListName.StylePriority.UsePadding = false;
            this.txtSalaryTableListName.StylePriority.UseTextAlignment = false;
            this.txtSalaryTableListName.Text = "txtSalaryTableListName";
            this.txtSalaryTableListName.TextAlignment = TextAlignment.MiddleLeft;
            this.txtSalaryTableListName.Weight = 1.186369375438078;
            this.txtCoefficientSalary.Name = "txtCoefficientSalary";
            this.txtCoefficientSalary.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtCoefficientSalary.StylePriority.UsePadding = false;
            this.txtCoefficientSalary.StylePriority.UseTextAlignment = false;
            this.txtCoefficientSalary.Text = "txtCoefficientSalary";
            this.txtCoefficientSalary.TextAlignment = TextAlignment.MiddleCenter;
            this.txtCoefficientSalary.Weight = 0.17301220400766584;
            this.txtBasicSalary.Name = "txtBasicSalary";
            this.txtBasicSalary.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtBasicSalary.StylePriority.UsePadding = false;
            this.txtBasicSalary.StylePriority.UseTextAlignment = false;
            this.txtBasicSalary.Text = "txtBasicSalary";
            this.txtBasicSalary.TextAlignment = TextAlignment.MiddleRight;
            this.txtBasicSalary.Weight = 0.33613799740454509;
            this.txtInsuranceSalary.Name = "txtInsuranceSalary";
            this.txtInsuranceSalary.StylePriority.UseTextAlignment = false;
            this.txtInsuranceSalary.Text = "txtInsuranceSalary";
            this.txtInsuranceSalary.TextAlignment = TextAlignment.MiddleRight;
            this.txtInsuranceSalary.Weight = 0.30647905947792436;
            this.txtAllowanceInsurance.Name = "txtAllowanceInsurance";
            this.txtAllowanceInsurance.StylePriority.UseTextAlignment = false;
            this.txtAllowanceInsurance.Text = "txtAllowanceInsurance";
            this.txtAllowanceInsurance.TextAlignment = TextAlignment.MiddleRight;
            this.txtAllowanceInsurance.Weight = 0.32707464388406604;
            this.txtAllowance.Name = "txtAllowance";
            this.txtAllowance.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtAllowance.StylePriority.UsePadding = false;
            this.txtAllowance.StylePriority.UseTextAlignment = false;
            this.txtAllowance.Text = "txtAllowance";
            this.txtAllowance.TextAlignment = TextAlignment.MiddleRight;
            this.txtAllowance.Weight = 0.34520073791854139;
            this.txtMinusLateEarly.Name = "txtMinusLateEarly";
            this.txtMinusLateEarly.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtMinusLateEarly.StylePriority.UsePadding = false;
            this.txtMinusLateEarly.StylePriority.UseTextAlignment = false;
            this.txtMinusLateEarly.Text = "txtMinusLateEarly";
            this.txtMinusLateEarly.TextAlignment = TextAlignment.MiddleRight;
            this.txtMinusLateEarly.Weight = 0.29659295644513317;
            this.txtMinusMoney.Name = "txtMinusMoney";
            this.txtMinusMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtMinusMoney.StylePriority.UsePadding = false;
            this.txtMinusMoney.StylePriority.UseTextAlignment = false;
            this.txtMinusMoney.Text = "txtMinusMoney";
            this.txtMinusMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtMinusMoney.Weight = 0.29659204641019254;
            this.txtInsurance.Name = "txtInsurance";
            this.txtInsurance.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtInsurance.StylePriority.UsePadding = false;
            this.txtInsurance.StylePriority.UseTextAlignment = false;
            this.txtInsurance.Text = "txtInsurance";
            this.txtInsurance.TextAlignment = TextAlignment.MiddleRight;
            this.txtInsurance.Weight = 0.29659234514232435;
            this.txtIncomeTaxMoney.Name = "txtIncomeTaxMoney";
            this.txtIncomeTaxMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtIncomeTaxMoney.StylePriority.UsePadding = false;
            this.txtIncomeTaxMoney.StylePriority.UseTextAlignment = false;
            this.txtIncomeTaxMoney.Text = "txtIncomeTaxMoney";
            this.txtIncomeTaxMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtIncomeTaxMoney.Weight = 0.29659232286418236;
            this.txtAdvance.Name = "txtAdvance";
            this.txtAdvance.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtAdvance.StylePriority.UsePadding = false;
            this.txtAdvance.StylePriority.UseTextAlignment = false;
            this.txtAdvance.Text = "txtAdvance";
            this.txtAdvance.TextAlignment = TextAlignment.MiddleRight;
            this.txtAdvance.Weight = 0.2965923519145231;
            this.txtAssignment.Name = "txtAssignment";
            this.txtAssignment.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtAssignment.StylePriority.UsePadding = false;
            this.txtAssignment.StylePriority.UseTextAlignment = false;
            this.txtAssignment.Text = "txtAssignment";
            this.txtAssignment.TextAlignment = TextAlignment.MiddleRight;
            this.txtAssignment.Weight = 0.29659233305768967;
            this.txtSalaryPlus.Name = "txtSalaryPlus";
            this.txtSalaryPlus.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtSalaryPlus.StylePriority.UsePadding = false;
            this.txtSalaryPlus.StylePriority.UseTextAlignment = false;
            this.txtSalaryPlus.Text = "txtSalaryPlus";
            this.txtSalaryPlus.TextAlignment = TextAlignment.MiddleRight;
            this.txtSalaryPlus.Weight = 0.29659235387712046;
            this.txtSalaryMinus.Name = "txtSalaryMinus";
            this.txtSalaryMinus.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtSalaryMinus.StylePriority.UsePadding = false;
            this.txtSalaryMinus.StylePriority.UseTextAlignment = false;
            this.txtSalaryMinus.Text = "txtSalaryMinus";
            this.txtSalaryMinus.TextAlignment = TextAlignment.MiddleRight;
            this.txtSalaryMinus.Weight = 0.2965923538771203;
            this.txtSalary.Name = "txtSalary";
            this.txtSalary.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtSalary.StylePriority.UsePadding = false;
            this.txtSalary.StylePriority.UseTextAlignment = false;
            this.txtSalary.Text = "txtSalary";
            this.txtSalary.TextAlignment = TextAlignment.MiddleRight;
            this.txtSalary.Weight = 0.30682076110863959;
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.ReportFooter, this.DetailReport });
            base.Font = new Font("Times New Roman", 9.75f);
            base.Landscape = true;
            base.Margins = new Margins(0x17, 0x18, 40, 40);
            this.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            base.PageHeight = 0x33b;
            base.PageWidth = 0x491;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListEmployee_BeforePrint);
            this.xrTable3.EndInit();
            this.xrTable1.EndInit();
            this.xrTable2.EndInit();
            this.EndInit();
        }

        private void LoadAllData()
        {
            HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
            hrm_employee.Get(this.m_EmployeeCode);
            this.txtEmployeeCode.Text = hrm_employee.EmployeeCode + " - " + hrm_employee.FirstName.ToUpper() + " " + hrm_employee.LastName.ToUpper();
            this.txtInformation.Text = "Chức vụ: " + hrm_employee.Position;
            DataSet set = new DataSet();
            DataTable salaryByYear = new DataTable();
            HRM_SALARY_ALLOWANCE hrm_salary_allowance = new HRM_SALARY_ALLOWANCE();
            salaryByYear = this.l_Salary.GetSalaryByYear(this.m_EmployeeCode, this.m_Year);
            set.Tables.Add(salaryByYear);
            this.DetailReport.DataSource = set;
            this.txtSalaryTableListName.DataBindings.Add("Text", base.DataSource, "SalaryTableListName");
            this.txtCoefficientSalary.DataBindings.Add("Text", base.DataSource, "CoefficientSalary");
            this.txtBasicSalary.DataBindings.Add("Text", base.DataSource, "BasicSalary", "{0:##,##0}");
            this.txtInsuranceSalary.DataBindings.Add("Text", base.DataSource, "InsuranceSalary", "{0:##,##0}");
            this.txtAllowanceInsurance.DataBindings.Add("Text", base.DataSource, "AllowanceInsurance", "{0:##,##0}");
            this.txtAllowance.DataBindings.Add("Text", base.DataSource, "Allowance", "{0:##,##0}");
            this.txtMinusLateEarly.DataBindings.Add("Text", base.DataSource, "MinusLateEarly", "{0:##,##0}");
            this.txtMinusMoney.DataBindings.Add("Text", base.DataSource, "MinusMoney", "{0:##,##0}");
            this.txtInsurance.DataBindings.Add("Text", base.DataSource, "Insurance", "{0:##,##0}");
            this.txtIncomeTaxMoney.DataBindings.Add("Text", base.DataSource, "IncomeTaxMoney", "{0:##,##0}");
            this.txtAdvance.DataBindings.Add("Text", base.DataSource, "Advance", "{0:##,##0}");
            this.txtAssignment.DataBindings.Add("Text", base.DataSource, "Assignment", "{0:##,##0}");
            this.txtSalaryPlus.DataBindings.Add("Text", base.DataSource, "SalaryPlus", "{0:##,##0}");
            this.txtSalaryMinus.DataBindings.Add("Text", base.DataSource, "SalaryMinus", "{0:##,##0}");
            this.txtSalary.DataBindings.Add("Text", base.DataSource, "Salary", "{0:##,##0}");
            this.txtTotal.DataBindings.Add("Text", base.DataSource, "Salary", "{0:##,##0}");
            this.txtTotal.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "{0:##,##0} VNĐ");
        }

        private void rptListEmployee_BeforePrint(object sender, PrintEventArgs e)
        {
            this.txtTitle.Text = "BẢNG LƯƠNG NH\x00c2N VI\x00caN NĂM " + this.m_Year.ToString();
            this.LoadAllData();
            //if (MyInfo.Get(MyEncryption.Encrypt("ERP01", "123654", true)) == "OK")
            {
                this.txtCompany.Text = "";//MyInfo.Company.ToUpper();
                this.txtAddress.Text = "";//MyInfo.Address;
                this.ptPhoto.Image = null;//MyInfo.Photo;
            }
        }

        private void txtOrder_BeforePrint(object sender, PrintEventArgs e)
        {
            this.m_Order++;
            this.txtOrder.Text = this.m_Order.ToString();
        }
    }
}

